Optimal. Leaf size=218 \[ -\frac {x}{(a-b)^2}+\frac {(9 a-7 b) b^{7/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{9/2} (a-b)^2 f}-\frac {\left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) \cot (e+f x)}{2 a^4 (a-b) f}+\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 (a-b) f}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.23, antiderivative size = 218, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 483, 597,
536, 209, 211} \begin {gather*} \frac {b^{7/2} (9 a-7 b) \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{9/2} f (a-b)^2}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 f (a-b)}+\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 f (a-b)}-\frac {\left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) \cot (e+f x)}{2 a^4 f (a-b)}-\frac {b \cot ^5(e+f x)}{2 a f (a-b) \left (a+b \tan ^2(e+f x)\right )}-\frac {x}{(a-b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 211
Rule 483
Rule 536
Rule 597
Rule 3751
Rubi steps
\begin {align*} \int \frac {\cot ^6(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x^6 \left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {2 a-7 b-7 b x^2}{x^6 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 a (a-b) f}\\ &=-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {5 \left (2 a^2+2 a b-7 b^2\right )+5 (2 a-7 b) b x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{10 a^2 (a-b) f}\\ &=\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 (a-b) f}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {15 \left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right )+15 b \left (2 a^2+2 a b-7 b^2\right ) x^2}{x^2 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{30 a^3 (a-b) f}\\ &=-\frac {\left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) \cot (e+f x)}{2 a^4 (a-b) f}+\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 (a-b) f}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {15 \left (2 a^4+2 a^3 b+2 a^2 b^2+2 a b^3-7 b^4\right )+15 b \left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{30 a^4 (a-b) f}\\ &=-\frac {\left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) \cot (e+f x)}{2 a^4 (a-b) f}+\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 (a-b) f}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}+\frac {\left ((9 a-7 b) b^4\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^4 (a-b)^2 f}\\ &=-\frac {x}{(a-b)^2}+\frac {(9 a-7 b) b^{7/2} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{9/2} (a-b)^2 f}-\frac {\left (2 a^3+2 a^2 b+2 a b^2-7 b^3\right ) \cot (e+f x)}{2 a^4 (a-b) f}+\frac {\left (2 a^2+2 a b-7 b^2\right ) \cot ^3(e+f x)}{6 a^3 (a-b) f}-\frac {(2 a-7 b) \cot ^5(e+f x)}{10 a^2 (a-b) f}-\frac {b \cot ^5(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.71, size = 165, normalized size = 0.76 \begin {gather*} \frac {\frac {15 (9 a-7 b) b^{7/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{9/2} (a-b)^2}-\frac {2 \cot (e+f x) \left (23 a^2+40 a b+45 b^2-a (11 a+10 b) \csc ^2(e+f x)+3 a^2 \csc ^4(e+f x)\right )}{a^4}+\frac {15 \left (-2 (e+f x)+\frac {(a-b) b^4 \sin (2 (e+f x))}{a^4 (a+b+(a-b) \cos (2 (e+f x)))}\right )}{(a-b)^2}}{30 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.47, size = 152, normalized size = 0.70
method | result | size |
derivativedivides | \(\frac {\frac {b^{4} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \left (\tan ^{2}\left (f x +e \right )\right )}+\frac {\left (9 a -7 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{4} \left (a -b \right )^{2}}-\frac {1}{5 a^{2} \tan \left (f x +e \right )^{5}}-\frac {-a -2 b}{3 a^{3} \tan \left (f x +e \right )^{3}}-\frac {a^{2}+2 a b +3 b^{2}}{a^{4} \tan \left (f x +e \right )}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) | \(152\) |
default | \(\frac {\frac {b^{4} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \left (\tan ^{2}\left (f x +e \right )\right )}+\frac {\left (9 a -7 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{4} \left (a -b \right )^{2}}-\frac {1}{5 a^{2} \tan \left (f x +e \right )^{5}}-\frac {-a -2 b}{3 a^{3} \tan \left (f x +e \right )^{3}}-\frac {a^{2}+2 a b +3 b^{2}}{a^{4} \tan \left (f x +e \right )}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}}{f}\) | \(152\) |
risch | \(-\frac {x}{a^{2}-2 a b +b^{2}}-\frac {i \left (240 a^{4} b \,{\mathrm e}^{10 i \left (f x +e \right )}-738 a^{4} {\mathrm e}^{4 i \left (f x +e \right )} b +168 a^{3} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-880 b^{4} {\mathrm e}^{2 i \left (f x +e \right )} a -12 a^{3} b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+132 b^{3} {\mathrm e}^{2 i \left (f x +e \right )} a^{2}-1720 a \,b^{4} {\mathrm e}^{6 i \left (f x +e \right )}+640 a^{4} b \,{\mathrm e}^{6 i \left (f x +e \right )}-120 a^{3} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-910 a^{4} b \,{\mathrm e}^{8 i \left (f x +e \right )}+344 b^{3} {\mathrm e}^{4 i \left (f x +e \right )} a^{2}+1605 b^{4} {\mathrm e}^{4 i \left (f x +e \right )} a -60 a^{3} b^{2} {\mathrm e}^{10 i \left (f x +e \right )}-150 a^{4} b \,{\mathrm e}^{12 i \left (f x +e \right )}+135 a \,b^{4} {\mathrm e}^{12 i \left (f x +e \right )}-60 a^{2} b^{3} {\mathrm e}^{10 i \left (f x +e \right )}-600 a \,b^{4} {\mathrm e}^{10 i \left (f x +e \right )}+1255 a \,b^{4} {\mathrm e}^{8 i \left (f x +e \right )}-840 a^{2} b^{3} {\mathrm e}^{6 i \left (f x +e \right )}+208 a^{4} {\mathrm e}^{2 i \left (f x +e \right )} b +420 a^{3} b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+500 a^{2} b^{3} {\mathrm e}^{8 i \left (f x +e \right )}-58 a^{4} b +46 a^{5}-105 b^{5}+205 a \,b^{4}-12 a^{3} b^{2}+630 b^{5} {\mathrm e}^{2 i \left (f x +e \right )}+90 a^{5} {\mathrm e}^{12 i \left (f x +e \right )}-105 b^{5} {\mathrm e}^{12 i \left (f x +e \right )}+46 a^{5} {\mathrm e}^{4 i \left (f x +e \right )}-1575 b^{5} {\mathrm e}^{4 i \left (f x +e \right )}-48 a^{5} {\mathrm e}^{2 i \left (f x +e \right )}+240 a^{5} {\mathrm e}^{6 i \left (f x +e \right )}+2100 b^{5} {\mathrm e}^{6 i \left (f x +e \right )}+630 b^{5} {\mathrm e}^{10 i \left (f x +e \right )}+10 a^{5} {\mathrm e}^{8 i \left (f x +e \right )}-1575 b^{5} {\mathrm e}^{8 i \left (f x +e \right )}-76 a^{2} b^{3}\right )}{15 f \,a^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{5} \left (a -b \right )^{2} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )}-\frac {9 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}+\frac {7 \sqrt {-a b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{5} \left (a -b \right )^{2} f}+\frac {9 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}-\frac {7 \sqrt {-a b}\, b^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{5} \left (a -b \right )^{2} f}\) | \(874\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 246, normalized size = 1.13 \begin {gather*} \frac {\frac {15 \, {\left (9 \, a b^{4} - 7 \, b^{5}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} \sqrt {a b}} - \frac {15 \, {\left (2 \, a^{3} b + 2 \, a^{2} b^{2} + 2 \, a b^{3} - 7 \, b^{4}\right )} \tan \left (f x + e\right )^{6} + 10 \, {\left (3 \, a^{4} + 2 \, a^{3} b + 2 \, a^{2} b^{2} - 7 \, a b^{3}\right )} \tan \left (f x + e\right )^{4} + 6 \, a^{4} - 6 \, a^{3} b - 2 \, {\left (5 \, a^{4} + 2 \, a^{3} b - 7 \, a^{2} b^{2}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{5} b - a^{4} b^{2}\right )} \tan \left (f x + e\right )^{7} + {\left (a^{6} - a^{5} b\right )} \tan \left (f x + e\right )^{5}} - \frac {30 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}}}{30 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.17, size = 698, normalized size = 3.20 \begin {gather*} \left [-\frac {120 \, a^{4} b f x \tan \left (f x + e\right )^{7} + 120 \, a^{5} f x \tan \left (f x + e\right )^{5} + 60 \, {\left (2 \, a^{4} b - 9 \, a b^{4} + 7 \, b^{5}\right )} \tan \left (f x + e\right )^{6} + 24 \, a^{5} - 48 \, a^{4} b + 24 \, a^{3} b^{2} + 40 \, {\left (3 \, a^{5} - a^{4} b - 9 \, a^{2} b^{3} + 7 \, a b^{4}\right )} \tan \left (f x + e\right )^{4} - 8 \, {\left (5 \, a^{5} - 3 \, a^{4} b - 9 \, a^{3} b^{2} + 7 \, a^{2} b^{3}\right )} \tan \left (f x + e\right )^{2} + 15 \, {\left ({\left (9 \, a b^{4} - 7 \, b^{5}\right )} \tan \left (f x + e\right )^{7} + {\left (9 \, a^{2} b^{3} - 7 \, a b^{4}\right )} \tan \left (f x + e\right )^{5}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} - 4 \, {\left (a b \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right )}{120 \, {\left ({\left (a^{6} b - 2 \, a^{5} b^{2} + a^{4} b^{3}\right )} f \tan \left (f x + e\right )^{7} + {\left (a^{7} - 2 \, a^{6} b + a^{5} b^{2}\right )} f \tan \left (f x + e\right )^{5}\right )}}, -\frac {60 \, a^{4} b f x \tan \left (f x + e\right )^{7} + 60 \, a^{5} f x \tan \left (f x + e\right )^{5} + 30 \, {\left (2 \, a^{4} b - 9 \, a b^{4} + 7 \, b^{5}\right )} \tan \left (f x + e\right )^{6} + 12 \, a^{5} - 24 \, a^{4} b + 12 \, a^{3} b^{2} + 20 \, {\left (3 \, a^{5} - a^{4} b - 9 \, a^{2} b^{3} + 7 \, a b^{4}\right )} \tan \left (f x + e\right )^{4} - 4 \, {\left (5 \, a^{5} - 3 \, a^{4} b - 9 \, a^{3} b^{2} + 7 \, a^{2} b^{3}\right )} \tan \left (f x + e\right )^{2} - 15 \, {\left ({\left (9 \, a b^{4} - 7 \, b^{5}\right )} \tan \left (f x + e\right )^{7} + {\left (9 \, a^{2} b^{3} - 7 \, a b^{4}\right )} \tan \left (f x + e\right )^{5}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {b}{a}}}{2 \, b \tan \left (f x + e\right )}\right )}{60 \, {\left ({\left (a^{6} b - 2 \, a^{5} b^{2} + a^{4} b^{3}\right )} f \tan \left (f x + e\right )^{7} + {\left (a^{7} - 2 \, a^{6} b + a^{5} b^{2}\right )} f \tan \left (f x + e\right )^{5}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.12, size = 225, normalized size = 1.03 \begin {gather*} \frac {\frac {15 \, b^{4} \tan \left (f x + e\right )}{{\left (a^{5} - a^{4} b\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}} + \frac {15 \, {\left (9 \, a b^{4} - 7 \, b^{5}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} \sqrt {a b}} - \frac {30 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}} - \frac {2 \, {\left (15 \, a^{2} \tan \left (f x + e\right )^{4} + 30 \, a b \tan \left (f x + e\right )^{4} + 45 \, b^{2} \tan \left (f x + e\right )^{4} - 5 \, a^{2} \tan \left (f x + e\right )^{2} - 10 \, a b \tan \left (f x + e\right )^{2} + 3 \, a^{2}\right )}}{a^{4} \tan \left (f x + e\right )^{5}}}{30 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 16.00, size = 2500, normalized size = 11.47 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________